/**
 * Created by zhang_yao_wu1993 on 15/4/21.
 */
$(document).ready(function() {
    // 初始化背景
    $("#particles").particleground({
        dotColor: "#5cbdaa",
        lineColor: "#5cbdaa"
    });

    $(".intro").css({
        "margin-top": -($(".intro").height() / 2)
    });

    $('.ui.dropdown').dropdown();

    $("#add_category_modal_show_button").click(function() {
        $('#add_category_modal').modal('show');
    });

    $("#add_category_submit_button").click(function() {
        var category = $("#add_category_modal div div input").val();
        $("#add_category_form input[type = text]").val(category);
        $("#add_category_form").submit();
    });

    $("#submit_button").click(function() {
        $("#add_article_form").submit();
    });
});